package com.tom.service.Impl;

import com.tom.doc.CourseDoc;
import com.tom.repository.CoueseElasticsearchRepisitory;
import com.tom.service.ICourserOnLineAndOffLineServie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ICourserOnLineAndOffLineServieImpl implements ICourserOnLineAndOffLineServie {
    @Autowired
    private CoueseElasticsearchRepisitory repisitory;

    @Override
    public void courseOnLine(CourseDoc doc) {
        repisitory.save(doc);
    }


    @Override
    public void courseOffLine(CourseDoc doc) {
        repisitory.delete(doc);
    }
}
